<<<<<<< HEAD
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="no-cache" http-equiv="Cache-Control">
    <title>源之东方</title>
    <link href="__STATIC__/css/shopin.css" rel="stylesheet"/>
    <link href="__STATIC__/css/swiper.css" rel="stylesheet"/>
    <link rel="stylesheet" href="__STATIC__/css/loading.css" />
</head>
{include file="public:footer" /}
<body>
<div class="header fixed-bar">
    <div class="center">
        <div class="search">
            <form action="">
                <input class="s-input" type="search" autocomplete="off" placeholder="请输入搜索内容" autosave="unique">
                <a class="s-btn" href="__STATIC__/javascript:;" data-trackid="搜索"></a>
            </form>
        </div>
    </div>
</div><!--//头部结束-->

<div class="content">
    <div class="list list-view"> <!-- larger-view -->
        <ul>
            {volist name="Missyou" id="vo"}
            <li>
                <a class="list-item" href="/product/info.html?id={$vo.id}" data-trackid="首页-精品推荐-1">
                    <div class="p"><img class="p-pic" src="{$vo.img.url}"></div>
                    <div class="d">
                        <h3 class="d-title clamp" style="height: 22px">
                        {$vo.summary}
                        </h3>
                        <h4 class="d-title clamp" style="height: 16px;color: blue">
                        {$vo.name}
                        </h4>
                        <div class="d-main">
                            <p class="price">
                                <del>￥{$vo.price}(市场价)</del>
                                <span class="s">￥<em class="n">{$vo.member_price}(会员价)</em></span>
                            </p>
                        </div>
                        <p class="discount"><b>热销产品</b></p>
                    </div>
                </a>
            </li>
            {/volist}
        </ul>
    </div>
    <div class="loading">
            <span>加载中...</span>
            <div class="pswp__preloader__icn">
              <div class="pswp__preloader__cut">
              <div class="pswp__preloader__donut"></div>
            </div>
        </div>
    </div>
</div>
<script src="__STATIC__/js/zepto.min.js"></script>
<script>
     var page = 0;
function to_select(){
        page++;
        
        $.ajax({
            type:"get",
            dataType:'json',
            data:{
                page:page,
                id:$('.list span').html(),
                number:1
            },
            url:"product/theme_page",
            async:true,
            success:function(data){
                
                var aobj = document.getElementsByClassName("list-view")[0];
            
                var data = data.data;
                console.log(data);
                if(data=="" || data==null){
                    $('.loading').html('');
                    $('.loading').html('<div class="mls">大哥！这是我底线</div>');
                }else{
                    if(data.length<6){
                        $('.loading').html('');
                        $('.loading').html('<div class="mls">大哥！这是我底线</div>')
                    }else{
                            
                    $('.loading').css('display','none');
                    for(var i =0;i<data.length;i++){
                        new_aobj = document.createElement("li");
                        new_aobj.innerHTML='<li>'+
                                            '<a class="list-item" href="index/Product/info?id='+data[i].products.id+'">'+
                                                '<div class="p"><img class="p-pic" src="">'+data[i].products.url+'</div>'+
                                                '<div class="d">'+
                                                    '<h3 class="d-title clamp">'+data[i].products.summary+'</h3>'+
                                                    '<div class="d-main">'+
                                                        
                                                    '</div>'+
                                                '</div>'+
                                            '</a>'+
                                        '</li>'
                        aobj.appendChild(new_aobj);
                    }
                    }
                }
            },
            error:function(error){ 
                //异常处理；
                console.log(error); 
            }
            });   
         }
   $(window).scroll(function(){
         var scrollTop = $(this).scrollTop();    //滚动条距离顶部的高度
         var scrollHeight = $(document).height();   //当前页面的总高度
         var clientHeight = $(this).height();    //当前可视的页面高度
         if(scrollTop + clientHeight >= scrollHeight){   //距离顶部+当前高度 >=文档总高度 即代表滑动到底部 
             //滚动条到达底部
             len = $('.mls').length;
             $('.mls').css('width','100%');
             $('.mls').css('margin','0 auto');
                if(len==1){
                    //到底没有数据不再触发ajax
                    return false;
                }else{
                    $('.loading').css('display','block');
                    to_select();
                }
         }
    });
</script>
</body>
=======
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="no-cache" http-equiv="Cache-Control">
    <title>源之东方</title>
    <link href="__STATIC__/css/shopin.css" rel="stylesheet"/>
    <link href="__STATIC__/css/swiper.css" rel="stylesheet"/>
    <link rel="stylesheet" href="__STATIC__/css/loading.css" />
</head>
{include file="public:footer" /}
<body>
<div class="header fixed-bar">
    <div class="center">
        <div class="search">
            <form action="">
                <input class="s-input" type="search" autocomplete="off" placeholder="请输入搜索内容" autosave="unique">
                <a class="s-btn" href="__STATIC__/javascript:;" data-trackid="搜索"></a>
            </form>
        </div>
    </div>
</div><!--//头部结束-->

<div class="content">
    <div class="list list-view"> <!-- larger-view -->
        <ul>
            {volist name="Missyou" id="vo"}
            <li>
                <a class="list-item" href="/product/info.html?id={$vo.id}" data-trackid="首页-精品推荐-1">
                    <div class="p"><img class="p-pic" src="{$vo.img.url}"></div>
                    <div class="d">
                        <h3 class="d-title clamp" style="height: 22px">
                        {$vo.summary}
                        </h3>
                        <h4 class="d-title clamp" style="height: 16px;color: blue">
                        {$vo.name}
                        </h4>
                        <div class="d-main">
                            <p class="price">
                                <del>￥{$vo.price}(市场价)</del>
                                <span class="s">￥<em class="n">{$vo.member_price}(会员价)</em></span>
                            </p>
                        </div>
                        <p class="discount"><b>热销产品</b></p>
                    </div>
                </a>
            </li>
            {/volist}
        </ul>
    </div>
    <div class="loading">
            <span>加载中...</span>
            <div class="pswp__preloader__icn">
              <div class="pswp__preloader__cut">
              <div class="pswp__preloader__donut"></div>
            </div>
        </div>
    </div>
</div>
<script src="__STATIC__/js/zepto.min.js"></script>
<script>
     var page = 0;
function to_select(){
        page++;
        
        $.ajax({
            type:"get",
            dataType:'json',
            data:{
                page:page,
                id:$('.list span').html(),
                number:1
            },
            url:"product/theme_page",
            async:true,
            success:function(data){
                
                var aobj = document.getElementsByClassName("list-view")[0];
            
                var data = data.data;
                console.log(data);
                if(data=="" || data==null){
                    $('.loading').html('');
                    $('.loading').html('<div class="mls">大哥！这是我底线</div>');
                }else{
                    if(data.length<6){
                        $('.loading').html('');
                        $('.loading').html('<div class="mls">大哥！这是我底线</div>')
                    }else{
                            
                    $('.loading').css('display','none');
                    for(var i =0;i<data.length;i++){
                        new_aobj = document.createElement("li");
                        new_aobj.innerHTML='<li>'+
                                            '<a class="list-item" href="index/Product/info?id='+data[i].products.id+'">'+
                                                '<div class="p"><img class="p-pic" src="">'+data[i].products.url+'</div>'+
                                                '<div class="d">'+
                                                    '<h3 class="d-title clamp">'+data[i].products.summary+'</h3>'+
                                                    '<div class="d-main">'+
                                                        
                                                    '</div>'+
                                                '</div>'+
                                            '</a>'+
                                        '</li>'
                        aobj.appendChild(new_aobj);
                    }
                    }
                }
            },
            error:function(error){ 
                //异常处理；
                console.log(error); 
            }
            });   
         }
   $(window).scroll(function(){
         var scrollTop = $(this).scrollTop();    //滚动条距离顶部的高度
         var scrollHeight = $(document).height();   //当前页面的总高度
         var clientHeight = $(this).height();    //当前可视的页面高度
         if(scrollTop + clientHeight >= scrollHeight){   //距离顶部+当前高度 >=文档总高度 即代表滑动到底部 
             //滚动条到达底部
             len = $('.mls').length;
             $('.mls').css('width','100%');
             $('.mls').css('margin','0 auto');
                if(len==1){
                    //到底没有数据不再触发ajax
                    return false;
                }else{
                    $('.loading').css('display','block');
                    to_select();
                }
         }
    });
</script>
</body>
>>>>>>> 93c40d8086b7a8d5a9aa3548fdc8eb06a4272cf7
</html>